package com.fan.base.dao;

import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;

public class BaseDao {
	@Autowired
	private SqlSessionTemplate sessionTemplate;

	public SqlSessionTemplate getSqlSession() {
		return sessionTemplate;
	}
	
	public <T> T getExecutor(Class<T> typ) {
		return sessionTemplate.getMapper(typ);
	}
}
